<?php
// Tim'Roster
// Copyright (c) 2011 Nicolas Nallet <aspgic2@gmail.com>
//
// This file is part of Tim'Roster.
//
// Tim'Roster is free software; you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// Tim'Roster is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

$xml_config = simplexml_load_file('config.xml');

include_once($_SERVER["DOCUMENT_ROOT"].$xml_config->roster_root_directory.'/technical_class/language/language.php');


function render_page_header(){

    $content = '<div valign="top"><table><tr>';

    if ((isset($_SESSION['user_id'])) && (isset( $_SESSION['token'])) && (User::is_user_logged())){
        $content .= '<td><fieldset><br/><h2>Hello <a class="darkred" href="user.php?id='.$_SESSION['user_id'].'" >'.ucfirst($_SESSION['user_name']).'</a></h2><a class="menu" href="login.php?logoff=1">'.Language::get_instance()->get_label('lb_logoff').'</a></fieldset></td></br>';
    }

    $content .= '<td><img src="img/banner.jpg" /></td></tr></table></div>';

    return $content;
}

function render_page_footer(){
    $content = '<div class="clearfooter"></div>
            <div class="footer"><br/><a href="http://code.google.com/p/ryzom-tim-roster/" class="darkred" >Tim\'Roster<a> | 2010-2011<br/>Version 1.0
            <br/>Powered by <a class="darkred" href="http://dev.ryzom.com/projects/ryzom-api/wiki">Ryzom Api v1</a></div>';

    return $content;


}

?>
